﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Dyao.Book.Contract;
using Foundation.Entity;

namespace Dyao.Book.Entity
{
    [Table("DataTaskCenterRecord")]
    public partial class TaskCenterRecordEntity : BaseEntity<int>, ICreateBy, ICreateOn, IUpdateBy, IUpdateOn
    {
        /// <summary>
        /// 任务配置Id
        /// </summary>
        [Required]
        [StringLength(100)]
        public string TaskCenterSettingsId { get; set; }

        /// <summary>
        /// 应用程序标识，用于区别数据所属系统'
        /// </summary>
        public string AppKey { get; set; }

        /// <summary>
        /// 分类
        /// </summary>
        public TaskCenterCategoryEnum Category { get; set; }

        /// <summary>
        /// 菜单路径
        /// </summary>
        [StringLength(200)]
        public string MenuPath { get; set; }

        /// <summary>
        /// 执行进度
        /// </summary>
        public decimal ExcutingProgress { get; set; }

        /// <summary>
        /// 运行开始时间
        /// </summary>
        public DateTime? ExcuteBeginDatetime { get; set; }

        /// <summary>
        /// 运行结束时间
        /// </summary>
        public DateTime? ExcuteEndDatetime { get; set; }

        /// <summary>
        /// 最大重试次数
        /// </summary>
        public int RetryCountMax { get; set; }

        /// <summary>
        /// 重试次数
        /// </summary>
        public int RetryCount { get; set; }

        /// <summary>
        /// 超时秒数
        /// </summary>
        public int? TimeOutSecond { get; set; }

        /// <summary>
        /// 是否超时
        /// </summary>
        public bool IsTimeOut { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        public TaskCenterRecordStatusEnum Status { get; set; }

        /// <summary>
        /// 运行结果信息
        /// </summary>
        [StringLength(500)]
        public string? ResultMessage { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [StringLength(500)]
        public string? Remark { get; set; }

        public int CreateUserId { get; set; }

        [Required]
        [StringLength(50)]
        public string CreateUserName { get; set; }

        public DateTime CreateDateTime { get; set; }

        public int UpdateUserId { get; set; }

        [Required]
        [StringLength(50)]
        public string UpdateUserName { get; set; }

        public DateTime UpdateDateTime { get; set; }

        [Required]
        public bool IsDel { get; set; }

        public DateTime? RowVersion { get; set; }

    }
}
